<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AlterUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->string('qqopenid')->default('')->comment('qqopenid');
            $table->string('qqname')->default('')->comment('qq昵称');
            $table->string('wechatopenid')->default('')->comment('wxopenid');
            $table->string('wechatname')->default('')->comment('wx昵称');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn('qqopenid');
            $table->dropColumn('qqname');
            $table->dropColumn('wechatopenid');
            $table->dropColumn('wechatname');
        });
    }
}
